export default {
    state: {
        ImgUrl: 'http://localhost:5000/download',
        isLoggedIn: false,
        userInfo: null,
    },
    getters: {
        getUserInfo(state) {
            return state.userInfo;
        },
        getIsLoggedIn(state) {
            return state.isLoggedIn;
        }
    },
    mutations: {
        login(state, user) {
            state.isLoggedIn = user ? true : false;
            state.userInfo = user ? user : null;
        },
        logout(state) {
            state.isLoggedIn = false;
            state.userInfo = null;
        }
    },
    actions: {
        login({ commit }, user) {
            commit('login', user);
        },
        logout({ commit }) {
            commit('logout');
        }
    },
    modules: {

    }
}